﻿<%@ Page Language="C#" MasterPageFile="~/provider/TravelInsurance/TravelInsurance.master"
    AutoEventWireup="true" CodeFile="ProviderTIPremium.aspx.cs" Inherits="Provider_TravelInsurance_ProviderTIPremium" %>

<%@ Register Src="~/controls/usrDate.ascx" TagName="usrDate" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
   <script src="~/controls/CE_Date.js" type="text/javascript"></script>
    <div class="provider_inner">
        <h1>
            Add/Edit Premium
        </h1>
        <fieldset>       
            <dl>
                <dt>
                    <label>
                        Type of policy</label></dt>
                <dd>
                    <asp:DropDownList ID="ddlPolicyType" runat="server" class="text" Width="145px" AutoPostBack="true"
                        OnSelectedIndexChanged="GetPlans">
                        <asp:ListItem Selected="True" Value="-1">Select</asp:ListItem>
                        <asp:ListItem Value="Individual">Individual</asp:ListItem>
                        <asp:ListItem Value="IndividualSpouse">Individual + Spouse</asp:ListItem>
                         <asp:ListItem Value="IndividualChild">Individual + Child</asp:ListItem>
                        <asp:ListItem Value="Family">Family</asp:ListItem>
                    </asp:DropDownList>
                    <asp:TextBox ID="txtPID" runat="server" Text="0" Visible="false"></asp:TextBox>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Plan Name</label></dt>
                <dd>
                    <asp:DropDownList ID="ddlPlanName" runat="server" class="text" Width="145px"
                        AutoPostBack="true" OnSelectedIndexChanged="CheckPremium_SelectedIndexChanged">                       
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvPlanName" runat="server" ErrorMessage="*"
                        ControlToValidate="ddlPlanName" InitialValue="-1"></asp:RequiredFieldValidator>
                    <asp:Label ID="lblTAId" runat="server" Text="0" Visible="false"></asp:Label>
                </dd>
            </dl>        
          
            <dl>
                <dt>
                    <label>
                        Area/Region</label></dt>
                <dd>
                    <asp:DropDownList ID="ddlAreaRegion" runat="server" class="text" Width="145px">
                    </asp:DropDownList>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Duration Start</label></dt>
                <dd>
                    <asp:TextBox ID="txtDurationStart" runat="server" Text="0"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvDurationStartNew" runat="server" ErrorMessage="Enter Duration Start"
                        ControlToValidate="txtDurationStart"></asp:RequiredFieldValidator>&nbsp;
                    <asp:RegularExpressionValidator ID="revDurationStartNew" runat="server" ControlToValidate="txtDurationStart"
                        ErrorMessage="!" ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Duration End</label></dt>
                <dd>
                    <asp:TextBox ID="txtDurationEnd" runat="server" Text="0"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvDurationEndNew" runat="server" ErrorMessage="Enter Duration End"
                        ControlToValidate="txtDurationEnd"></asp:RequiredFieldValidator>&nbsp;
                    <asp:RegularExpressionValidator ID="revDurationEndNew" runat="server" ControlToValidate="txtDurationEnd"
                        ErrorMessage="!" ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Price</label></dt>
                <dd>
                    <asp:TextBox ID="txtPrice" runat="server" Text="0"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvPriceNew" runat="server" ErrorMessage="Enter Price"
                        ControlToValidate="txtPrice" Display="Dynamic" ></asp:RequiredFieldValidator>&nbsp;
                    <asp:RegularExpressionValidator ID="revPriceNew" runat="server" ControlToValidate="txtPrice"
                        ErrorMessage="!" ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$" Display="Dynamic"></asp:RegularExpressionValidator>
                         <i><asp:Label ID="lblAnnual" runat="server" Text="*annual plan's premium duration start and end day should be zero (0)."></asp:Label></i>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Schedule Price Update</label></dt>
                <dd>
                   <asp:RadioButtonList runat="server" ID="rdoEffectivity"  RepeatDirection="Horizontal" AutoPostBack="true" OnSelectedIndexChanged="EffectiveWhen">
                   <asp:ListItem Value="Yes">Yes</asp:ListItem>
                   <asp:ListItem Value="No">No</asp:ListItem>                   
                   </asp:RadioButtonList>
                  
                </dd>
            </dl>
            <div id="divNewRate" runat="server" visible="false">
             <dl>
                <dt>
                    <label>
                        Effectivity Date</label></dt>
                <dd>
                   <uc1:usrDate ID="usrEffectivityDate"  runat="server" IsNotLessThanToday="true" />
                  
                </dd>
            </dl>
            
             <dl>
                <dt>
                    <label>
                        New Price</label></dt>
                <dd>
                    <asp:TextBox ID="txtNewRate" runat="server" MaxLength="5"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvNewRate" runat="server" ControlToValidate="txtNewRate"
                        ErrorMessage="Enter new rate." Display="Dynamic" ></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revNewRate" runat="server" ControlToValidate="txtNewRate"
                        ErrorMessage="Rate is not valid."  ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                </dd>
            </dl>
            </div>
            <dl>
                <dt>
                    <label>
                        Auth Code</label></dt>
                <dd>
                    <asp:TextBox ID="txtAuthCode" runat="server" TextMode="Password" MaxLength="12" Width="150px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvAuthCode" runat="server" ControlToValidate="txtAuthCode"
                        ErrorMessage="Enter auth code." ></asp:RequiredFieldValidator>
                </dd>
            </dl>
        </fieldset>
        <fieldset class="action">
            <asp:ImageButton OnClientClick="javascript:return confirm('Are you sure to go back?');"
                ID="ibtBack" runat="server" CssClass="left_btn" ImageUrl="~/Provider/images/buttons/back1.gif"
                OnClick="ibtBack_Click" />
            <asp:ImageButton ID="ibtSubmit" runat="server" CssClass="float_btn" ImageUrl="~/Provider/images/buttons/submit1.gif"
                OnClick="ibtSubmit_Click" />
            <asp:ImageButton ID="btnNew" CssClass="floatnext_btn" CausesValidation="false" runat="server" ImageUrl="~/Provider/images/buttons/new1.gif"
                OnClick="btnNew_Click" />
            <asp:ImageButton ID="btnDelete" CssClass="floatnext_btn" OnClientClick="return confirm('Are you sure you want to remove this record?');"
                runat="server" ImageUrl="~/Provider/images/buttons/delete1.gif" OnClick="btnDelete_Click" />
        </fieldset>
        <asp:Label ID="lblMessage" runat="server" CssClass="successmsg"></asp:Label>
    </div>
</asp:Content>
